<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* 设置div的宽高使其大于图片的大小 */
            width: 400px;
            height: 100px;
            border: 1px solid #ff0000;
            /* 设置一个背景图片 */
            background-image: url("./log50.png");
        }

        .div1 {
            /* 不重复绘制 */
            background-repeat: no-repeat;
        }

        .div2 {
            /* x,y轴上重复绘制（这个是默认值） */
            background-repeat: repeat;
        }

        .div3 {
            /* 仅在x轴上重复 */
            background-repeat: repeat-x;
        }
    </style>
</head>
<body>
    <p>不重复：background-repeat: no-repeat;</p>
    <div class="div1"></div>
    <p>重复（默认）：background-repeat: repeat;</p>
    <div class="div2"></div>
    <p>仅在x轴上重复：background-repeat: repeat-x;</p>
    <div class="div3"></div>
</body>
</html>